package com.sihai.ehr.jdbc;

import java.util.Date;

/**
 * author: wxn
 * since: 13-10-14 下午9:46
 */
public class QingJia {
    private int user_serial; //id
    private String bh; //出差：00101, 外出：00109
    private Date kssj; //开始时间
    private Date jssj; //结束时间
    private int jsjg; //开始时间到结束时间之间的时间(分钟)
    private String bz; //原因
    private String gly_no; //admin
    private String shenhe; //admin
    private String jbrq; //时间

    public int getUser_serial() {
        return user_serial;
    }

    public void setUser_serial(int user_serial) {
        this.user_serial = user_serial;
    }

    public String getBh() {
        return bh;
    }

    public void setBh(String bh) {
        this.bh = bh;
    }

    public Date getKssj() {
        return kssj;
    }

    public void setKssj(Date kssj) {
        this.kssj = kssj;
    }

    public Date getJssj() {
        return jssj;
    }

    public void setJssj(Date jssj) {
        this.jssj = jssj;
    }

    public int getJsjg() {
        return jsjg;
    }

    public void setJsjg(int jsjg) {
        this.jsjg = jsjg;
    }

    public String getBz() {
        return bz;
    }

    public void setBz(String bz) {
        this.bz = bz;
    }

    public String getGly_no() {
        return gly_no;
    }

    public void setGly_no(String gly_no) {
        this.gly_no = gly_no;
    }

    public String getShenhe() {
        return shenhe;
    }

    public void setShenhe(String shenhe) {
        this.shenhe = shenhe;
    }

    public String getJbrq() {
        return jbrq;
    }

    public void setJbrq(String jbrq) {
        this.jbrq = jbrq;
    }

    public int getMinutes(){
        if(kssj == null || jssj == null){
            return 0;
        }
        return (int)(Math.abs(jssj.getTime() - kssj.getTime()) / (1000 * 60));
    }
}
